package com.ruoyi.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mapper.ConstructionRecordingMapper;
import com.ruoyi.domain.ConstructionRecording;
import com.ruoyi.service.IConstructionRecordingService;
import com.ruoyi.common.core.text.Convert;

/**
 * 施工日志Service业务层处理
 *
 * @author ruoyi
 * @date 2020-07-07
 */
@Service
public class ConstructionRecordingServiceImpl implements IConstructionRecordingService {
    @Autowired
    private ConstructionRecordingMapper constructionRecordingMapper;

    /**
     * 查询施工日志
     *
     * @param cId 施工日志ID
     * @return 施工日志
     */
    @Override
    public ConstructionRecording selectConstructionRecordingById(Long cId) {
        return constructionRecordingMapper.selectConstructionRecordingById(cId);
    }

    /**
     * 查询施工日志列表
     *
     * @param constructionRecording 施工日志
     * @return 施工日志
     */
    @Override
    public List<ConstructionRecording> selectConstructionRecordingList(ConstructionRecording constructionRecording) {
        return constructionRecordingMapper.selectConstructionRecordingList(constructionRecording);
    }

    /**
     * 新增施工日志
     *
     * @param constructionRecording 施工日志
     * @return 结果
     */
    @Override
    public int insertConstructionRecording(ConstructionRecording constructionRecording) {

        return constructionRecordingMapper.insertConstructionRecording(constructionRecording);
    }

    /**
     * 修改施工日志
     *
     * @param constructionRecording 施工日志
     * @return 结果
     */
    @Override
    public int updateConstructionRecording(ConstructionRecording constructionRecording) {
        return constructionRecordingMapper.updateConstructionRecording(constructionRecording);
    }

    /**
     * 删除施工日志对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteConstructionRecordingByIds(String ids) {
        return constructionRecordingMapper.deleteConstructionRecordingByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除施工日志信息
     *
     * @param cId 施工日志ID
     * @return 结果
     */
    @Override
    public int deleteConstructionRecordingById(Long cId) {
        return constructionRecordingMapper.deleteConstructionRecordingById(cId);
    }

    @Override
    public List<ConstructionRecording> selectConstructionRecordingLists(Long sid) {
        return constructionRecordingMapper.selectConstructionRecordingLists(sid);
    }

    @Override
    public List<ConstructionRecording> selectall(ConstructionRecording constructionRecording) {
        return constructionRecordingMapper.selectall(constructionRecording);
    }
}
